<template>
	<uv-navbar auto-back placeholder />
	<web-view :src="`${baseUrl}/student/report/go-over.html?logId=${id}&${Math.random().toString().toString().slice(2, 5)}`" />
</template>

<script>
export default {
	data () {
		return {
			id: ''
		}
	},
	
	onLoad({ id }) {
		this.id = id;
	},
	
	mounted() {
		this.$nextTick(() => {
			let height = 0;
			let statusbar = 0;
			
			uni.createSelectorQuery()
				.in(this)
				.select('.uv-navbar')
				.boundingClientRect(rect => {
					uni.getSystemInfo({ // 获取当前设备的具体信息
						success: (sysinfo) => {
							statusbar = sysinfo.statusBarHeight + rect?.height / 2 + (sysinfo.screenWidth > 480 ? 20 : 0);
							height = sysinfo.windowHeight;
						}
					});
					
					const currentWebview = this.$scope?.$getAppWebview?.();
					const wv = currentWebview?.children?.()?.[0];
					wv?.setStyle?.({
						top: statusbar,
						height: height - statusbar
					});
					
				})
				.exec();
		});
	}
}
</script>